{include file="public/header" /}
</head>
<body>
<div class="wrap js-check-wrap">
    <form class="js-ajax-form" data-action="{:url('application/device')}"  method="post" action="{:url('application/device')}">
        <div class="well form-inline margin-top-20" >
            用户名:
            <input type="text" class="form-control" name="userName" style="width: 200px;"
                   value="{$params['userName']}" placeholder="请输入手机号或者邮箱地址">　
            UDID:
            <input type="text" class="form-control" name="udid" style="width: 200px;"
                   value="{$params['udid']}" placeholder="请输入UDID">　
            bundle ID:
            <input type="text" class="form-control" name="bundleID" style="width: 200px;"
                   value="{$params['bundleID']}" placeholder="请输入bundle ID">　
            重签状态:
            <select class="form-control" name="status" style="width: 200px;">
                <option value=''>全部</option>
                <option value='1' {if condition="$params['status'] eq '1'"}selected="selected" {/if} >已重签</option>
                <option value='0'  {if condition="$params['status'] eq '0'"}selected="selected" {/if} >未重签</option>
            </select>
            <br>
            <br>
            筛选时间:
            <input type="text" class="form-control js-bootstrap-date" name="startDate"
                   value="{$params['startDate']}"
                   style="width: 140px;" autocomplete="off">-
            <input type="text" class="form-control js-bootstrap-date" name="endDate"
                   value="{$params['endDate']}"
                   style="width: 140px;" autocomplete="off">　
            <input type="submit" class="btn btn-primary" value="搜索"/>　
            <a href="{:url('application/deviceExport?'.http_build_query($params))}" class="btn btn-info">导出excel</a>　
            <a class="btn btn-danger" href="{:url('application/device')}">清空</a>
        </div>

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th>ID</th>
                <th>应用名称</th>
                <th>bundle ID</th>
                <th>应用图标</th>
                <th>设备</th>
                <th>UDID</th>
                <th width="400">下载url</th>
                <th>状态</th>
                <th>修改时间</th>
                <th>创建时间</th>
            </tr>
            </thead>
            {foreach name="list" item="vo"}
            <tr>
                <td>{$vo.id}</td>
                <td>{$vo.appName}</td>
                <td>{$vo.bundleId}</td>
                <td>
                    <img src="{$vo['appIcon']|default='/static/admin/images/default-thumbnail.png'}" width="50"/>
                </td>
                <td>{$vo.device}</td>
                <td>{$vo.udid}</td>
                <td>{$vo.downloadUrl}</td>
                <td>
                    {switch $vo.status }
                        {case 0}
                            <span class="color-red">未重签</span>
                        {/case}
                        {case 1}
                            <span class="color-green">已重签</span>
                        {/case}
                    {/switch}
                </td>
                <td>{$vo.modifyTime}</td>
                <td>{$vo.createTime}</td>
            </tr>
            {/foreach}
        </table>
        {:$pagination}
    </form>
</div>
<script src="{$static}js/admin.js"></script>
</body>
</html>